export function checkedReg(form){
    if (form.account === ''){
        return {account: true}
    }
    else if (form.password === ''){
        return {password:true }
    }
    else  if (form.passwordConfirm !== form.password){
        return {passwordConfirm:true }
    }
    else  if (form.validateCode === ''){
        return {validateCode:true }
    }
    else  if (form.invitationCode === ''){
        return {invitationCode:true }
    }
    else{
        return {
            account: false, 	//账号 1
            countryCode: false, 	//国家码 1
            invitationCode: false, 	//邀请码1
            password: false, 	//密码1
            phoneValidateCode: false, //手机验证码
            randstr: false, 	//腾讯验证randstr
            realName: false, //真实姓名
            ticket: false, 	//腾讯验证ticket
            uuid: false, //随机码1
            passwordConfirm:false,
            validateCode: false //图形验证码1
        }
    }

}

export function combinedData (s){
    return s.reduce((acc, curr, index) => {
        if (index % 2 === 0) {
            acc.push({
                commission: curr,
                number: s[index + 1]
            });
        }
        return acc;
    }, []);

}